import request from "@/utils/request";

// 查询护理等级列表
export function listLevel(query) {
  return request({
    url: "/service/level/list",
    method: "get",
    params: query,
  });
}

// 查询护理等级详细
export function getLevel(id) {
  return request({
    url: "/service/level/" + id,
    method: "get",
  });
}

// 新增护理等级
export function addLevel(data) {
  return request({
    url: "/service/level",
    method: "post",
    data: data,
  });
}

// 修改护理等级
export function updateLevel(data) {
  return request({
    url: "/service/level",
    method: "put",
    data: data,
  });
}

// 删除护理等级
export function delLevel(id) {
  return request({
    url: "/service/level/" + id,
    method: "delete",
  });
}

//启用禁用护理等级
export function stopLevel(id, status) {
  return request({
    url: "/service/level/changeStatus/" + id,
    method: "put",
    params: { status },
  });
}

//查询所有护理计划
export function getCarePlanList(query) {
  return request({
    url: "/service/plan/list",
    method: "get",
    params: query,
  });
}

//查询老人表
export function getElderBindIdList() {
  return request({
    url: "/service/level/bindIds",
    method: "get",
  });
}
